package object;

public class Student {

	private String name;

	public Student() {
		super();
		
	}

	
	public Student(String name) {
		super();
		this.name = name;
	}


	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	
	
	@Override
	public String toString() {
		return this.name;
	}
	
	

	@Override
	public boolean equals(Object obj) {
		String name = ((Student)obj).getName();
		System.out.println(name);
		return this.name == name;
	}


	public static void main(String[] args) {
		Student student = new Student("李四");
		Student student1 = new Student("李四");
		System.out.println(student.equals(student1));
	/*	System.out.println(student);
		System.out.println(student.toString());*/
	}
	
}
